import { Commit } from "vuex";
interface IData {
  topPageName: string;
  navName: string;
  topBannerPic: string;
  bannerPic: string;
  wapBannerPic: string;
}
interface IData2 {
  id?: number;
  brandLimit?: number;
  goodsLimit?: number;
  sort?: number;
  smallPic?: string;
  typeId?: number;
  title?: string;
  topImage?: string;
  bottomImage?: string;
}

interface IBrands {
  code?: number;
  data?: IData;
  msg?: string;
  time?: number;
}
interface IBrands2 {
  code?: number;
  data?: IData2;
  msg?: string;
  time?: number;
}

interface IState {
  brands: Array<IBrands>;
}
interface IState2 {
  brands: Array<IBrands2>;
}
interface IBrand {
  namespaced: boolean;
  state: IState;
  actions: {
    getBrand: ({ commit }: { commit: Commit }) => void;
  };
  mutations: {
    GET_BRAND: (state: IState, { res }: { res: IBrands[] }) => void;
  };
}
interface IBrand2 {
  namespaced: boolean;
  state: IState2;
  actions: {
    getBrand: ({ commit }: { commit: Commit }) => void;
  };
  mutations: {
    GET_BRAND: (state: IState2, { res }: { res: IBrands2[] }) => void;
  };
}

interface IBrandDotos {
  maxQuanJia: number;
  discount: 5;
  jumpType: number;
  mjumpHref: string;
  pcjumpHref: string;
  todayNewGoodsNum: number;
  profitSwitch: number;
  selfProfit: string;
  brandLabelOne: {
    val: string;
  };
  fansNum: number;
  longProfit: string;
  startTime: string;
  endTime: string;
  startNumTime: number;
  endNumTime: number;
  brandId: number;
  brandName: string;
  label: string;
  brandLogo: string;
  backgroundImg: string;
  recentSale: number;
  hotPush: {
    brandId: number;
    fresh: number;
    lowest: number;
    sellerId: string;
    sort: number;
    salesTwentyFour: number;
    salesOneHour: number;
    discount: number;
    marketIds: string;
    thirtySellNum: number;
    handsel: number;
    reachPrice: number;
    flagshipStore: number;
    huodongType: string;
    id: number;
    pic: string;
    xiaoliang: number;
    xiaoliangText: string;
    yuanjia: number;
    quanJine: number;
    jiage: number;
    sellDear: string;
    goodsLabels: {
      val: string;
    }[];
    market_group: [];
  }[];
  typeId: number;
}

interface IData_body {
  brandDTOS: IBrandDotos[];
  brandsNum: number;
  mainTitle: string;
  subTitle: string;
}

interface IBrands_body {
  code?: number;
  data?: IData_body;
  msg?: string;
  time?: number;
}
interface IState_body {
  brands: Array<IBrands_body>;
}
interface IBrandBody {
  namespaced: boolean;
  state: IState_body;
  actions: {
    getBrand: ({ commit }: { commit: Commit }) => void;
  };
  mutations: {
    GET_BRAND: (state: IState_body, { res }: { res: IBrands_body[] }) => void;
  };
}

// interface IData_skip {
//   brandId: number;
//   brandName: string;
//   brandLogo: string;
//   sort: number;
//   recentSale: number;
//   maxQuanJia: number;
//   discount: number;
//   brandLabelOne: {
//     val: string;
//   };
//   brandLabelTwo: {
//     val: string;
//   };
//   hotPush: {
//     tmall: number;
//     flagshipStore: number;
//     isHaitao: number;
//     sellerId: string;
//     labelTwo: string;
//     huodongType: number;
//     fresh: number;
//     lowest: number;
//     reachPrice: number;
//     todaySellnum: number;
//     marketIds: string;
//     thirtySellNum: number;
//     id: number;
//     pic: string;
//     quanJine: number;
//     yuanjia: number;
//     jiage: number;
//     discount: number;
//     goodsLabels: {
//       val: string;
//     }[];
//     goodsLabelOne: {
//       val: string;
//     };
//     market_group: [];
//     beforePriceLabelType: number;
//     dtitle: string;
//   }[];
// }

interface IPush {
  tmall: number;
  flagshipStore: number;
  isHaitao: number;
  sellerId: string;
  labelTwo: string;
  huodongType: number;
  fresh: number;
  lowest: number;
  reachPrice: number;
  todaySellnum: number;
  marketIds: string;
  thirtySellNum: number;
  id: number;
  pic: string;
  quanJine: number;
  yuanjia: number;
  jiage: number;
  discount: number;
  goodsLabels: {
    val: string;
  }[];
  goodsLabelOne: {
    val: string;
  };
  market_group: [];
  beforePriceLabelType: string;
  dtitle: string;
}
interface IData_skip {
  brandId: number;
  brandName: string;
  brandLogo: string;
  sort: number;
  recentSale: number;
  maxQuanJia: number;
  discount: number;
  brandLabelOne: {
    val: string;
  };
  brandLabelTwo: {
    val: string;
  };
  hotPush: IPush[];
}
interface IPay {
  type: string;
  val: string;
}
interface IBrands_skip {
  code?: number;
  data?: IData_skip[];
  msg?: string;
  time?: number;
}
interface IState_skip {
  brands: Array<IBrands_skip>;
}
interface IBrandSkip {
  namespaced: boolean;
  state: IState_skip;
  actions: {
    getBrand: (
      { commit }: { commit: Commit },
      { params }: { params: IPay }
    ) => void;
  };
  mutations: {
    GET_BRAND: (state: IState_skip, { res }: { res: IBrands_skip[] }) => void;
  };
}

export { IBrand, IBrand2, IBrandBody, IBrandSkip, IData2 };
